<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<!-- <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" /> -->
	<!-- <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" /> -->
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<!-- <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" /> -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/custom.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/typo.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/slider-show/demo.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/slider-show/style2.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/slideproduct.css" />
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/slider-show/modernizr.custom.28468.js"></script>

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<!-- <body> -->
<body id="index" class="index hide-right-column lang_en fullwidth off-canvas-inactive">

<section id="page" data-column="col-xs-12 col-sm-6 col-md-4" data-type="grid">
	<div id="header-main">
		<div class="container">
			<div class="inner">
				<div id="header_logo" class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
					<a href="/thanhshop/" title="Leo Giftshop">
						<img class="logo img-responsive" src="http://demo4leotheme.com/prestashop/leo_gift_shop_demo/img/leo-giftshop-1409908788-1.jpg" alt="Leo Giftshop" width="144" height="56">
					</a>
				</div>
				<div id="header_right">
					<div id="leo-mainnav">
						<nav id="cavas_menu" class="sf-contener leo-megamenu">
							<div class="" role="navigation">
								<!-- Brand and toggle get grouped for better mobile display -->
								<div class="navbar-header">
									<button type="button" class="navbar-toggle btn-outline-inverse" data-toggle="collapse" data-target=".navbar-ex1-collapse">
										<span class="sr-only">Toggle navigation</span>
										<span class="fa fa-bars"></span>
									</button>
								</div>
								<!-- Collect the nav links, forms, and other content for toggling -->
								<div id="leo-top-menu" class="collapse navbar-collapse navbar-ex1-collapse">
									<ul class="nav navbar-nav megamenu">
										<li class="active">
											<a href="/thanhshop/" target="_self" class="has-category"><span class="menu-title">Home</span></a>
										</li>
										<li class="full-width parent dropdown aligned-center ">
											<a href="http://demo4leotheme.com/prestashop/leo_gift_shop_demo/en/14-bags" class="dropdown-toggle has-category" data-toggle="dropdown" target="_self">
												<span class="menu-title">Features</span>
												<b class="caret"></b>
											</a>
										</li>
										<li class="parent dropdown ">
											<a class="dropdown-toggle has-category" data-toggle="dropdown" href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/post/" target="_self">
												<span class="menu-title">Tin tức</span>
												<b class="caret"></b>
											</a>
											<div class="dropdown-menu level1">
												<div class="dropdown-menu-inner">
													<div class="row">
														<div class="mega-col col-sm-12" data-type="menu">
															<div class="mega-col-inner ">
																<ul>
																<?php 
																	$group_post = GroupPost::model()->findAll();
																	foreach ($group_post as $value) {
																		echo '<li class="">'.CHtml::link($value->group_name,array('grouppost/view','id'=>$value->id)).'</li>';
																	}
																?>
																</ul>
															</div>
														</div>
													</div>
												</div>
											</div>
										</li>
										<li class="">
											<a href="<?php echo Yii::app()->request->baseUrl.'/site/contact' ?>" target="_self" class="has-category"><span class="menu-title">Liên Hệ</span></a>
										</li>
									</ul>
								</div>
							</div>
						</nav>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<!-- Slide show -->
	 <div class="slider-container">
		<div id="da-slider" class="da-slider">
			<?php
				$posts = Post::model()->getPostSlideShow();
				foreach ($posts as $post) {
					$string = strip_tags($post->post_content);
					$words = preg_split("/[\n\r\t ]+/", $string, 30, PREG_SPLIT_NO_EMPTY);
			    	array_pop($words);
			        $post_description = implode(' ', $words);
			        $post_description = $post_description . " ...";
				?>
					<div class="da-slide">
						<h2 class="slider-title"><?php echo $post->post_title; ?></h2>
						<p class="slider-content"><?php echo $post_description; ?></p>
						<a href="<?php echo Yii::app()->request->baseUrl.'/post/'.$post->id; ?>" class="da-link">Read more</a>
						<div class="da-img"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/posts/<?php echo $post->image_link; ?>" alt="<?php echo $post->post_title; ?>" /></div>
					</div>
				<?php }
			 ?>
			<nav class="da-arrows">
				<span class="da-arrows-prev"></span>
				<span class="da-arrows-next"></span>
			</nav>
		</div>
    </div>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/slider-show/jquery.cslider.js"></script>
	<script type="text/javascript">
		$(function() {
		
			$('#da-slider').cslider({
				autoplay	: true,
				bgincrement	: 450
			});
		
		});
	</script>
	<!-- End slide show -->

	<section id="columns" class="columns-container">
		<div class="container">
			<div id="top_column" class="center_column clearfix"></div>
			<div class="row">
				<!-- Left -->
				<section id="left_column" class="column sidebar col-md-3" role="navigation">
					<!-- Block categories module -->
					<div id="categories_block_left" class="block block-highlighted nopadding">
						<h4 class="title_block cleafix">Danh mục sản phẩm<span class="fa fa-bars pull-right"></span></h4>
						<div class="block_content" style="">
							<ul class="list-block list-group bullet" style="display: block;">
							<?php
								$categorys = Category::model()->findAll();
								foreach ($categorys as $key => $value) {
									echo '<li class="list-category">'.CHtml::link($value->categorys_name,array('category/view','id'=>$value->id)).'</li>';
								}
							?>
							</ul>
						</div>
					</div>
					<!-- /Block categories module -->
				    <div class="row nopadding border-radius">
				   		<div class="widget col-lg-12 col-md-12 col-sm-12 col-xs-12 col-sp-12">
				   			<div class="widget-html block">
				   				<div class="block_content">
				   					<p><a href="#"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/banner-sidebar.jpg" alt="01"></a></p>
				   				</div>
				   			</div>
				   		</div>
				   	</div>
				   	<div class="row">
				   		<div class="widget col-lg-12 col-md-12 col-sm-12 col-xs-12 col-sp-12 hidden-sp hidden-xs hidden-sm">
				   			<!-- cart_default	 -->
				   			<div class="widget-images block bg-green">
				   				<h4 class="title_block">Sản Phẩm nổi bật<span class="fa fa-th-large pull-right"></span></h4>
				   				<div class="block_content clearfix" style="">
				   					<div class="images-list clearfix">
				   						<div class="row">
				   							<?php
				   								$limit = '10'; 
				   								$productFeatured = Product::model()->getProductFeatured($limit);
				   								foreach ($productFeatured as $key => $value) {
				   									echo '<div class="image-item  col-md-4 col-xs-4">';
				   									echo '<a class="fancybox" rel="leogallery35" href="'.Yii::app()->request->baseUrl.'/product/'.$value['id'].'">';
				   									echo '<img class="replace-2x img-responsive" src="'.Yii::app()->request->baseUrl.'/images/product/'.$value['image_link'].'" alt="'.$value['product_name'].'">';
				   									echo '</a>';
				   									echo '</div>';
				   								}
				   							?>
										</div>
									</div>
								</div>
							</div>
							<script type="text/javascript">
								$(document).ready(function() {
								$(".fancybox").fancybox({
									openEffect	: 'none',
									closeEffect	: 'none'
								});
							});
							</script>
							<div id="post_silebar" class="block post-silebar">
						      <h4 class="title_block">Bài viết mới nhất</h4>
						      	<div class="box_content">
								  	<ul class="box_news">
								  	<?php
								  		$limit = '5'; // Phần limit sẽ select trong db
										$list_post = Post::model()->gitPostNew($limit);
										foreach ($list_post as $key => $value) {
											echo '<li>';
											if (($key + 1) == count($list_post)) {
												echo '<a class="clearfix last" title="'.$value['post_title'].'" href="'.Yii::app()->request->baseUrl.'/post/'.$value['id'].'">';
											} else {
												echo '<a class="clearfix" title="'.$value['post_title'].'" href="'.Yii::app()->request->baseUrl.'/post/'.$value['id'].'">';
											}
						          			echo '<img class="avatar" src="'.Yii::app()->request->baseUrl.'/images/posts/'.$value['image_link'].'" alt="'.$value['post_title'].'">';
						          			echo '<div class="post_silebar_title">'.$value['post_title'].'</div>';
											echo '</a></li>';
									} ?>
								 	</ul>
								</div>
						    </div>
						    <!-- /Block categories module -->
						</div>
						<div class="widget col-lg-12 col-md-12 col-sm-12 col-xs-12 col-sp-12 slider_left hidden-sp hidden-xs hidden-sm">
							<div id="custhtmlcarosel2138493418" class="block">
								<h4 class="title_block">testimonials</h4>
								<div class="carousel-inner">
									<div class="item item">
										<p><a href="#"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/img_1.jpg" alt="01"> </a></p>
										<h4>leonardo di caprio</h4>
										<h6>Cretive Manager</h6>
										<p>Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum</p>
									</div>
									<div class="item item">
										<p><a href="#"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/img_2.jpg" alt="01"> </a></p>
										<h4>leonardo di caprio</h4>
										<h6>Cretive Manager</h6>
										<p>Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum</p>
									</div>
									<div class="item item active">
										<p><a href="#"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/img_3.jpg" alt="01"> </a></p>
										<h4>leonardo di caprio</h4>
										<h6>Cretive Manager</h6>
										<p>Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum</p>
									</div>
								</div>
							</div>
							<script type="text/javascript">
							$(document).ready(function() {
							    $('#custhtmlcarosel2138493418').each(function(){
							        $(this).carousel({
							            pause: true,
							            interval: 4000
							        });
							    });
							     
							});
							</script>
						</div>
					</div>
				    <!-- Block categories module -->
				    <div id="categories_blog_menu" class="block blog-menu">
				      <h4 class="title_block">Blog Categories</h4>
				        <div class="block_content" style="">
				            <ul class="level1 tree  dynamized" style="display: block;">
				            	<li id="list_11" class="last">
				            		<span class="grower pull-right CLOSE"> </span>
				            		<a href="http://demo4leotheme.com/prestashop/leo_gift_shop_demo/en/blog/category-1-c11.html" title="Category 1">
				            			<span>Category 1</span>
				            		</a>
				            		<ul class="level2 " style="display: none;">
				            			<li id="list_12" class=" ">
				            				<a href="http://demo4leotheme.com/prestashop/leo_gift_shop_demo/en/blog/sub-category-1-c12.html" title="Sub Category 1">
				            					<span>Sub Category 1</span>
				            				</a>
				            			</li>
				            			<li id="list_13" class="icon last">
				            				<a href="http://demo4leotheme.com/prestashop/leo_gift_shop_demo/en/blog/sub-category-2-c13.html" title="Sub Category 2">
				            					<span>Sub Category 2</span>
				            				</a>
				            			</li>
				            		</ul>
				            	</li>
				            </ul>
				        </div>
				    </div>
				    <!-- /Block categories module -->
				</section>
				<section id="center_column" class="col-md-9">
					<?php echo $content; ?>
				</section>
			</div>
		</div>
	</section>

	<div class="clear"></div>

	<section id="bottom">
		<div class="container container-nopadding">
			<div class="row">
				<div class="widget col-lg-12 col-md-12 col-sm-12 col-xs-12 col-sp-12">
					<div class="widget-html block">
						<div class="block_content">
							<div class="service-group hidden-xs hidden-sm row text-center">
								<div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
									<div class="service-block">
										<div class="image-wrapper">
											<img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/icon-1.png" alt="01">
										</div>
										<h3>Free delivery</h3>
										<p>Commodi aspernatur id hic ipsa</p>
									</div>
								</div>
								<div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
									<div class="service-block">
										<div class="image-wrapper"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/icon-2.png" alt="01"></div>
										<h3>Money back guarantee</h3>
										<p>Bibendum auctor nisi elit consequat</p>
									</div>
								</div>
								<div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
									<div class="service-block">
										<div class="image-wrapper"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/icon-3.png" alt="01"></div>
										<h3>Member discount</h3>
										<p>Bibendum auctor nisi elit consequat</p>
									</div>
								</div>
								<div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
									<div class="service-block">
										<div class="image-wrapper"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/icon-4.png" alt="01"></div>
										<h3>Secure payment</h3>
										<p>Nec sagittis sem nibh id elituis sed odio</p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>

	<div id="footer">
		<footer class="footer-container">
			<section id="leo-footer-center" class="footer-center">
				<div class="container"> 
					<div class="inner">			
						<div class="row min-hieght">
							<div class="widget col-lg-3 col-md-3 col-sm-6 col-xs-6 col-sp-12">
								aaaaaaaaaaa
							</div>
							<div class="widget col-lg-3 col-md-3 col-sm-6 col-xs-6 col-sp-12">
								bbbbbbbbbbb
							</div>
							<div class="widget col-lg-3 col-md-3 col-sm-6 col-xs-6 col-sp-12">
								cccccccccccc
							</div>
							<div class="widget col-lg-3 col-md-3 col-sm-6 col-xs-6 col-sp-12">
								ddddddddd
							</div>
						</div>
					</div>
				</div>
			</section><!-- #footercenter -->
			<section id="leo-footer-bottom" class="footer-bottom">
				<div class="container">
					<div class="inner">
						<div class="row">
							<div class="widget col-lg-2-4 col-md-2-4 col-sm-6 col-xs-12 col-sp-12 content_ct_footer">
								<div class="widget-links block">
									<h4 class="title_block">Information</h4>
									<div class="block_content">
										<div id="tabs664040518" class="panel-group">
											<ul class="nav-links">
												<li><a href="#link1">About Us</a></li>
												<li><a href="#link2">Delivery Information</a></li>
												<li><a href="#link3">Privacy Policy</a></li>
												<li><a href="#link4">Terms &amp; Conditions</a></li>
											</ul>
										</div>
									</div>
								</div>
							</div>
							<div class="widget col-lg-2-4 col-md-2-4 col-sm-6 col-xs-12 col-sp-12 content_ct_footer">
								<div class="widget-links block">
									<h4 class="title_block">Customer  Service</h4>
									<div class="block_content">
										<div id="tabs83577290" class="panel-group">
											<ul class="nav-links">
											  <li><a href="#link1">Contact Us</a></li>
											  <li><a href="#link2">Returns</a></li>
											  <li><a href="#link3">Site Map</a></li>
											  <li><a href="#">Terms &amp; Conditions</a></li>
											</ul>
										</div>
									</div>
								</div>
							</div>
							<div class="widget col-lg-2-4 col-md-2-4 col-sm-6 col-xs-12 col-sp-12 content_ct_footer">
								<div class="widget-links block">
									<h4 class="title_block">Extras</h4>
									<div class="block_content">	
										<div id="tabs1243331646" class="panel-group">
											<ul class="nav-links">	    
											  <li><a href="#link1">Brands</a></li>
											  <li><a href="#link2">Gift Vouchers</a></li>
											  <li><a href="#link3">Affiliates</a></li>
											  <li><a href="#link4">Specials</a></li>
								  			</ul>
								  		</div>
								  	</div>
								</div>
							</div>
							<div class="widget col-lg-2-4 col-md-2-4 col-sm-6 col-xs-12 col-sp-12 content_ct_footer">
								<!-- Block Newsletter module-->
								<div id="newsletter_block_left" class="block inline">
									<h4 class="title_block">newsletter</h4>
									<p class="hidden-xs text-newsletter">Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt</p>
									<div class="block_content">
										<form action="http://demo4leotheme.com/prestashop/leo_gift_shop_demo/en/" method="post">
											<div class="news-footer clearfix">
												<input class="inputNew newsletter-input form-control" id="newsletter-input" type="text" name="email" size="18" value="Enter your e-mail">
												<input type="submit" value="ok" class="button_mini btn-outline btn button-default" name="submitNewsletter">
												<input type="hidden" name="action" value="0">
											</div>
										</form>
									</div>
								</div><!-- /Block Newsletter module-->
							</div>
							<div class="widget col-lg-2-4 col-md-2-4 col-sm-6 col-xs-12 col-sp-12 content_ct_footer">
								<div id="social_block" class="block">
									<h4 class="title_block">Get social</h4>
									<p class="hidden-xs text-social">Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt</p>
										<div class="block_content">
											<ul class="links">
												<li class="facebook">
													<a target="_blank" href="http://www.facebook.com/prestashop" data-original-title="Facebook">
														<span>Facebook</span>
													</a>
												</li>
												<li class="twitter">
													<a target="_blank" href="http://www.twitter.com/prestashop" data-original-title="Twitter">
														<span>Twitter</span>
													</a>
												</li>
												<li class="rss">
													<a target="_blank" href="http://www.prestashop.com/blog/en/feed/" data-original-title="RSS">
														<span>RSS</span>
													</a>
												</li>
								        	    <li class="youtube">
									        		<a target="_blank" href="https://www.youtube.com/" data-original-title="Youtube">
									        			<span>Youtube</span>
									        		</a>
									        	</li>
					        	        	    <li class="google-plus">
									        		<a target="_blank" href="https://plus.google.com/" data-original-title="Google Plus">
									        			<span>Google Plus</span>
									        		</a>
									        	</li>
									        </ul>
									    </div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</section><!-- #footerbottom -->
			<section id="footernav" class="footer-nav">
				<div class="container">
					<div class="inner">
						<div class="row">
							<div id="powered" class="col-lg-6 col-md-6 col-sm-12 col-xs-12 col-sp-12">Copyright 2014. All Rights Reserved.<br>Developed By <span class="copyright-leotheme">hungnup</span>
							</div><!-- #poweredby -->
							<div id="footnav" class="widget col-lg-6 col-md-6 col-sm-12 col-xs-12 col-sp-12">
								<div class="row">
									<div class="widget col-lg-12 col-md-12 col-sm-12 col-xs-12 col-sp-12">
										<div class="widget-html block">
											<div class="block_content">
												<div class="paypal pull-right"><a href="#"><img class="img-responsive" src="/prestashop/leo_gift_shop_demo/themes/leo_giftshop/img/modules/leomanagewidgets/paypal.png" alt="01"></a></div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</section>
		</footer>
	</div>
</section>
</body>
</html>
	